<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<script src="../static/js/jquery.min.js" type="text/javascript"></script>
<script src="../static/js/bootstrap.min.js"  type="text/javascript"></script>
<link href="../static/css/bootstrap.min.css"  type="text/css" rel="stylesheet">
<link href="../static/css/index.css" type="text/css" rel="stylesheet">

<title>公开课安排表</title>
<script type="text/javascript">
$(function () {
	var show_count = 20;   //要显示的条数
	var count = 1;    //递增的开始值，这里是你的ID
	$("#btn_addtr").click(function () {

		var length = $("#dynamicTable tbody tr").length;
		//alert(length);
		if (length < show_count)    //点击时候，如果当前的数字小于递增结束的条件
		{
			$("#tab11 tbody tr").clone().appendTo("#dynamicTable tbody");   //在表格后面添加一行
			changeIndex();//更新行号
		}
	});


});
function changeIndex() {
	var i = 1;
	$("#dynamicTable tbody tr").each(function () { //循环tab tbody下的tr
		$(this).find("input[name='NO']").val(i++);//更新行号
	});
}

function deltr(opp) {
	var length = $("#dynamicTable tbody tr").length;
	//alert(length);
	if (length <= 1) {
		alert("至少保留一行");
	} else {
		$(opp).parent().parent().remove();//移除当前行
		changeIndex();
	}
}
</script>


	
</head>

<body>
<!--头部-->
<nav class="navbar navbar-default navbar-fixed-top  top" role="navigation">
  <div class="container-fluid">
  
        <div class="navbar-header" style=" width:100%;">
                  <a class="navbar-brand"  href="javascript:history.go(-1);" style=" width:100%;  padding-right:0px;">
                  
                   <span class="glyphicon glyphicon-arrow-left white"></span>
               <!--    <span class="glyphicon glyphicon-pause white" style="margin-left:2%;"></span>-->
                   <span class="white" style="margin-left:10%">公开课安排表</span>
                   <span class="glyphicon glyphicon-user white" style="float:right"></span>
                 
                 
                  </a>
          
        
        </div>

   
  
  </div><!-- /.container-fluid -->
</nav>
<!--头部 end-->
<!--主体部分-->
<div class="container" style="margin-top:70px;">
     <div class="row" style="margin-right:10%;">
         <div  class="col-xs-sm  text-right" > <button class="btn btn-primary"  id="btn_addtr" style="width:30%">增加</button></div>
     </div><!--row  end-->
       
       <div class="col-xs-12 text-center" style="margin-top:10px;"><h5>第一周工作周历表</h5></div>
       
       
      <div class="row" style="margin-top:45px;margin-left:1px; margin-right:1px;">
      
      <table id="tab11" style="display: none; ">
		<tbody >
			<tr >
				 <td >
					<input type="text" name="NO" size="2" value="1" class="form-control" />
                  </td>   
                
              
				<td >
					<input type="text" name="start_end_time" class="form-control" />
                </td>
				<td >
					<input type="text" name="unit_department"  class="form-control"  value="435"/>
                </td>
				<td >
					<input type="text" name="post" class="form-control" />
                    
                 </td>
				<td>
                <input type="text" name="post" class="form-control" />
					
				</td>
                <td>
                <button class="btn btn-danger"  id="btn_addtr" >确定</button>
                </td>
			</tr>
		</tbody>
	</table>
      
      <div id="page-wrap" >
	<table  id="dynamicTable" >
		<!--<thead>
		<tr>
			<th>周次</th>
			<th>日期</th>
			<th>主要内容</th>
			<th>负责部门</th>
			<th>备注</th>
            <th>操作</th>
           
			
		</tr>
		</thead>-->
		<tbody>
		<!--<tr  >
			<td>1</td>
			<td>8月30日-9月12日</td>
			<td>主要内容</td>
			<td>负责部门</td>
			<td>按时给第三个</td>
            <td>确定1</td>
			
		</tr>-->
		
		
		</tbody>
	</table>
	

	
</div>


      </div>
      
     
</div><!--container  end-->
<!--主体部分  end-->
<!--底部-->

<div class="container" style="margin-top:25%;">
    <div class="row">
       
     <div class="footer navbar-fixed-bottom">
      <div class="col-xs-12" style=" height:15%"></div>
        <div class="col-md-4  col-xs-4 text-center" >
          <p class="glyphicon glyphicon-home white footer_font"></p>
          <p><a href="" class="white  footer_font2">首页</a></p>
        </div>
        
         <div class="col-md-4 col-xs-4 text-center white  ">
           <p class="glyphicon glyphicon-comment white  footer_font"></p>
           <p><a href=""  class="white  footer_font2">消息</a></p>
         </div>
          <div class="col-md-4 col-xs-4 text-center white" >
           <p class="glyphicon glyphicon-asterisk white footer_font"></p>
           <p ><a href=""  class="white  footer_font2">设置</a></p>
          </div>
        
     </div><!--footer  end-->
    
    </div><!--row  end-->

</div><!--container  end-->


<!--底部end-->


</body>
</html>
